#pragma once

#include <gofcl_dac_swt.h>

typedef struct {
	u32_s dac0_soft_trig : 1;
	u32_s dac1_soft_trig : 1;
	u32_s : 30;
} dac_swt_expl_s;

_Static_assert(sizeof(dac_swt_expl_s) == 4,
	       "Struct dac_swt_expl_s defined error!");

// 控制DAC软件触发
static inline void dac_soft_trig_ctl(dac_swt_expl_s swt) {
	union {
		dac_swt_expl_s e;
		dac_swt_s s;
	} su = {
		.e = swt,
	};
	dac_wreg_swt_s(su.s);
}
